(()=>{"use strict";class t{static setCommonConstants(){this.script=document.currentScript,this.loadedCss=[],this.loadedJs=[]}static addCSS(t,e,i=!1,s=null){if(void 0===this.loadedCss&&(this.loadedCss=[]),!t||-1!==this.loadedCss.indexOf(t))return e?e():null;let r=document.createElement("link");return r.type="text/css",r.rel="stylesheet",r.href=t,i&&window!==window.parent&&this.isCrossDomainIframe()?window.parent.document.head.appendChild(r):document.head.appendChild(r),document.head.appendChild(r),"function"==typeof e&&r.addEventListener("load",e),"function"==typeof s&&r.addEventListener("error",s),this.loadedCss.push(t)}static addJS(t,e,i=!1){if(void 0===this.loadedJs&&(this.loadedJs=[]),!t||-1!==this.loadedJs.indexOf(t))return e?e():null;let s=document.createElement("script");return s.type="text/javascript",s.src=t,i&&window!==window.parent&&this.isCrossDomainIframe()?window.parent.document.head.appendChild(s):document.head.appendChild(s),e&&s.addEventListener("load",e),this.loadedJs.push(t)}static openWindow(t){let e=document.createElement("a");return e.href=t,e.target="_blank",e.rel="noopener noreferrer nofollow",e.click()}static getScriptSelector(t){return'[src*=".trustindex."][src*="'+t+'.js"],[data-src*=".trustindex."][data-src*="'+t+'.js"]'}static getScriptKey(t){let e=t.getAttribute("data-src")||t.getAttribute("src"),i=e.replace(/.+\?([^&]+)/,"$1");return i&&i!==e&&-1===i.indexOf("=")?i:null}static getCDNUrl(){if(void 0!==this.cdnUrl&&this.cdnUrl)return this.cdnUrl;let t="undefined"!=typeof sessionStorage?sessionStorage.getItem("ti-cdn-url"):null;if(t)return t;let e="https://cdn.trustindex.io/",i=e;if(this.script&&this.script.src){let t=this.script.src.split("/");t.pop(),i=t.join("/")+"/"}return-1===i.indexOf("trustindex.")&&(i=e),this.cdnUrl=i,this.isAdminUrl()||i===e||sessionStorage.setItem("ti-cdn-url",i),i}static getWidgetUrl(t){return void 0===t?null:this.getCDNUrl()+"widgets/"+t.substring(0,2)+"/"+t+"/"}static getDecodedHtml(t){let e=document.createElement("textarea");return e.innerHTML=t,e.value}static getRelativeTime(t,e){let i=e.split("|"),s=i.shift(),r=i.shift(),o=[86400,604800,2419200,31536e3],a=(new Date).getTime()/1e3-t;for(let t=o.length-1;t>=0;t--)if(a>=o[t]){let e=Math.floor(a/o[t]),r=2*t;return e>1&&r++,s.replace("%d",e).replace("%s",i[r])}return r}static getDevicePixelRatio(){let t=1;return void 0!==window.screen.systemXDPI&&void 0!==window.screen.logicalXDPI&&window.screen.systemXDPI>window.screen.logicalXDPI?t=window.screen.systemXDPI/window.screen.logicalXDPI:void 0!==window.devicePixelRatio&&(t=window.devicePixelRatio),Math.min(t,2)}static getDefaultAvatarUrl(){let t=Math.floor(10*Math.random())+1;return this.getCDNUrl()+"assets/default-avatar/noprofile-"+(t<10?"0":"")+t+".svg"}static getPageLanguage(){return(document.documentElement.lang||"en").substr(0,2).toLowerCase()}static getUserLanguage(){return(navigator.language||navigator.userLanguage||this.getPageLanguage()).substr(0,2).toLowerCase()}static isAdminUrl(t){let e=t?new URL(t):location;return/(admin|stage[0-9kw])\.trustindex/.test(e.hostname)&&-1===e.href.indexOf("test/widget.html")}static isWordpressAdminUrl(t){return-1!==(t?new URL(t):location).href.indexOf("settings.php&tab=free-widget-configurator")}static isAdminEditUrl(t){return void 0===t&&(t=location.href),-1!==t.indexOf("widget/edit")}static isTestWidgetUrl(t){return void 0===t&&(t=location.href),-1!==t.indexOf("test/widget.html")}static isCrossDomainIframe(){if(window.parent===window)return!1;try{let t=new URL(window.parent.location);return t.protocol!==location.protocol||t.hostname!==location.hostname||t.port!==location.port}catch(t){return null}}static isMobileDevice(){return this.isAdminUrl()&&!this.isAdminEditUrl()?!!document.querySelector(".widget-editor.mobile"):/mobi/i.test(navigator.userAgent||navigator.vendor||window.opera)}static isWebpSupported(t){if(void 0!==this.cacheWebpSupported)return t(this.cacheWebpSupported);let e=e=>(this.cacheWebpSupported=e,t(e)),i=new Image;i.onload=()=>e(i.width>0&&i.height>0),i.onerror=()=>e(!1),i.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"}static isDarkMode(){var t,e;return!!(null==(e=null==(t=null==window?void 0:window.matchMedia)?void 0:t.call(window,"(prefers-color-scheme:dark)"))?void 0:e.matches)}static waitForVisibility(t,e,i=0){if(t.offsetWidth>0)return i?setTimeout(e,i):e();new ResizeObserver((function(t){t[0].target.offsetWidth>0&&(e(),this.disconnect())})).observe(t)}static isInLoadTriggerZone(t,e=1200){let i=t.getBoundingClientRect();return i.right<=(window.innerWidth||document.documentElement.clientWidth)+e&&i.bottom<=(window.innerHeight||document.documentElement.clientHeight)+e}static getProxyUrl(t="eu"){if(!t){t={Europe:"eu"}[Intl.DateTimeFormat().resolvedOptions().timeZone.split("/")[0]]||"eu"}return{eu:{url:"https://de-proxy.trustindex.io/",key:"base64:3j5bZXQ07QEkVq0lFnTw5g=="}}[t]?{eu:{url:"https://de-proxy.trustindex.io/",key:"base64:3j5bZXQ07QEkVq0lFnTw5g=="}}[t].url+"trustindex-1stp/cdn-loader.php":""}static disableBodyScroll(){void 0===this.oldBodyScrollAttributes&&(this.oldBodyScrollAttributes={documentElement:{overflow:document.documentElement.style.overflow,position:document.documentElement.style.position,height:document.documentElement.style.height},body:{overflowX:document.body.style.overflowX,height:document.body.style.height}},document.documentElement.style.overflow="hidden",document.documentElement.style.position="relative",document.documentElement.style.height="unset",document.body.style.overflowX="unset",document.body.style.height="unset")}static enableBodyScroll(){if(void 0!==this.oldBodyScrollAttributes){for(let t in this.oldBodyScrollAttributes)for(let e in this.oldBodyScrollAttributes[t])document[t].style[e]=this.oldBodyScrollAttributes[t][e];delete this.oldBodyScrollAttributes}}static getFetchApi(){if(void 0!==this.fetchApi&&this.fetchApi)return this.fetchApi;let t=document.createElement("iframe");return document.body.appendChild(t),this.fetchApi=t.contentWindow.fetch.bind(window),t.remove(),this.fetchApi}static request(t){return new Promise(((e,i)=>{const s=new XMLHttpRequest;s.open("GET",t,!0),s.onload=function(){s.status>=200&&s.status<300?e(s.responseText):e(!1)},s.onerror=function(){e(!1)},s.send()}))}}var e=(t,e,i)=>new Promise(((s,r)=>{var o=t=>{try{n(i.next(t))}catch(t){r(t)}},a=t=>{try{n(i.throw(t))}catch(t){r(t)}},n=t=>t.done?s(t.value):Promise.resolve(t.value).then(o,a);n((i=i.apply(t,e)).next())}));class i extends t{static resize_widgets(){}static init(){}static init_pager(){-1!==decodeURIComponent(location.href).indexOf("page=testimonial-widgets/tabs/create-widget.php")&&(this.destroyWidgets(),this.initWidgetsFromDom(!0))}static setConstants(){this.setCommonConstants(),this.svgs={good:'',bad:''},this.additionalLogoStyles={"header-logo":{Google:"height: 25px; top: -2px",Facebook:"height: 17px",Trustindex:"height: 19px",Tripadvisor:"height: 24px; top: -2px",Airbnb:"height: 26px; top: -3px",Yelp:"height: 32px; top: -8px",Amazon:"height: 13px; top: 1px",Arukereso:"height: 17px; top: 5px",Vrbo:"height: 20px; top: -2px",BBB:"height: 25px; top: -2px",Expedia:"height: 25px; top: -3px",Ebay:"height: 25px; top: -2px",Sitejabber:"height: 20px; top: 1px",Thumbtack:"height: 25px; top: -3px",Provenexpert:"height: 25px; top: 1px",Hotels:"height: 22px; top: -1px",Zillow:"height: 17px",Yell:"height: 18px",Checkatrade:"height: 15px; top: 2px",Capterra:"height: 15px; top: 2px",Etsy:"height: 20px; top: 1px",WordpressPlugin:"height: 13px; top: 1px",AngiesList:"height: 24px; top: -1px",OnlinePenztarca:"height: 30px; top: -3px",ConsumerAffairs:"height: 30px; top: -3px",Reviewsio:"height: 20px; top: 0px",Foursquare:"height: 15px; top: 3px",Justdial:"height: 15px; top: 3px",Houzz:"height: 20px; top: -3px",Indeed:"height: 17px; top: 0px"},"large-logo":{Facebook:"width: 145px; height: 28px",Google:"width: 110px; height: 35px",Yelp:"width: 95px; height: 46px; top: -5px",Airbnb:"width: 120px; height: 38px",Tripadvisor:"width: 155px; height: 33px",Trustpilot:"width: 140px; height: 34px",Hotels:"width: 152px; height: 30px",Amazon:"width: 120px; height: 25px",Bookatable:"height: 27px; left: 7px",Foursquare:"height: 20px; top: 3px",Trustindex:"width: 152px; height: 26px; top: 3px",Booking:"height: 25px",Opentable:"height: 35px",Capterra:"height: 34px",Thumbtack:"height: 34px",Fresha:"height: 21px",Expedia:"height: 44px",Mobilede:"height: 35px",Checkatrade:"height: 22px",Pricerunner:"height: 21px",Easyweddings:"height: 50px; top: 3px",Whichtrustedtraders:"width: 80px; height: 55px; top: -15px; left: 10px",Abia:"width: 100px; height: 41px",WordpressPlugin:"height: 35px",Zoover:"height: 22px",Arukereso:"height: 25px","Arukereso-ro":"height: 29px",Pricespy:"height: 39px","Pricespy-dk":"height: 42px","Pricespy-fi":"height: 35px","Pricespy-fr":"height: 31px","Pricespy-no":"height: 43px",Szallashu:"height: 26px","Szallashu-com":"height: 29px","Szallashu-cz":"height: 47px","Szallashu-pl":"height: 34px","Szallashu-ro":"height: 29px"},"small-logo":{Facebook:"width: 78px; height: 15px; top: 1px",Google:"width: 62px; height: 20px; top: 1px",Yelp:"width: 45px; height: 22px; top: -3px",Airbnb:"width: 64px; height: 20px",Tripadvisor:"width: 97px; height: 21px; top: 1px",Trustpilot:"width: 65px; top: 2px",Hotels:"width: 100px; height: 20px",Amazon:"width: 68px; height: 20px; top: 1px",Bookatable:"width: 83px; height: 15px; top: 1px",Foursquare:"width: 98px; height: 13px; top: 3px",Trustindex:"width: 95px; height: 16px; top: 2px",Booking:"width: 90px; height: 15px; top: 3px",Opentable:"width: 100px; height: 23px; top: -1px",Capterra:"width: 79px; height: 18px; top: 1px",Thumbtack:"width: 79px; height: 18px; top: 2px",Fresha:"width: 93px; height: 13px; top: 2px; left: 1px",Expedia:"width: 65px; height: 19px; top: 2px",Zillow:"width: 67px; height: 14px; top: 2px",Reco:"width: 76px; height: 16px",Mobilede:"width: 68px; height: 16px; top: 2px",Checkatrade:"width: 90px; height: 13px; top: 1.5px",Pricerunner:"width: 102px; height: 14px; top: 1px",Easyweddings:"width: 60px; height: 20px",Whichtrustedtraders:"width: 34px; height: 23px; top: -1px",Abia:"width: 40px; height: 16px",Ebay:"width: 45px; height: 18px; top: 1px",BBB:"width: 42px; height: 16px; top: 2px",WordpressPlugin:"width: 85px; height: 11px; top: 2px",Arukereso:"width: 92px; height: 15px; top: 1px","Arukereso-bg":"width: 89px; height: 15px; top: 3px","Arukereso-ro":"width: 77px; height: 15px; top: 3px",Pricespy:"width: 69px; height: 18px","Pricespy-dk":"width: 64px; height: 18px","Pricespy-fi":"width: 77px; height: 18px","Pricespy-fr":"width: 88px; height: 18px","Pricespy-no":"width: 63px; height: 18px","Pricespy-nu":"width: 63px; height: 18px",Szallashu:"width: 76px; height: 13px; top: 2px","Szallashu-com":"width: 95px; height: 18px","Szallashu-cz":"width: 61px; height: 19px; top: 3px","Szallashu-pl":"width: 74px; height: 17px; top: 3px","Szallashu-ro":"width: 100px; height: 19px",Provenexpert:"width: 98px; height: 21px; top: 3px",Vrbo:"width: 45px; height: 15px; top: 1px",Yell:"width: 38px; height: 14px; top: 2.5px",AngiesList:"width: 27px; height: 16px; top: 3px",Sitejabber:"width: 85px; height: 16px; top: 4px",Aliexpress:"width: 67px; height: 16px; top: 3.5px"}},this.richSnippetLoaded=document.querySelectorAll('script[src*=".trustindex.io/assets/js/richsnippet.js"], script[type="application/ld+json"][data-trustindex="1"]').length>0}static loadWidgetsFromDom(){return e(this,null,(function*(){document.querySelectorAll(this.getScriptSelector("loader")).forEach((t=>{if(t.getAttribute("data-ti-widget-inited"))return;t.setAttribute("data-ti-widget-inited",!0);let i=this.getScriptKey(t);if(!i)return;let s=Boolean(t.getAttribute("data-enable-delay-load"));if("SCRIPT"===t.tagName){let e=document.createElement("div");e.key=t.key,t.replaceWith(e),t=e}t.key=i,t.isTriggerLoad=e=>this.isInLoadTriggerZone(t,e),(t=>{e(this,null,(function*(){let e=yield this.getWidgetHtml(t);if(!1===e)return t.innerHTML='\n\t\t\t\t\t\tWidget not found! Probably it is already deleted or there is typo in its ID.\n\t\t\t\t\t\tWe suggest that you log in to the Trustindex system and follow the widget configuration instructions.\n\t\t\t\t\t\tOr, if you don\'t have an account, create one for free at www.trustindex.io\n\t\t\t\t\t';if(!e)return t.replaceWith(document.createComment("Trustindex widget ("+t.key+") is empty here."));if(/style="[^"]*border: 4px dashed red[^"]*"/.test(e))return t.innerHTML=e;let i=-1!==e.indexOf('data-lazy-load-disabled="1"');s||(s=-1!==e.indexOf('data-delay-load="1" class="ti-widget'));let r=/(?:data-layout-category="[^"]*floating[^"]*"|data-layout-id="(?:17|21|52|53)")/.test(e);if(!t.closest("head")||r){if(t.contentHtml=e,!this.richSnippetLoaded){let t=/data-rich-snippet="([^"]+)"/.exec(e);t&&t[1]&&(this.richSnippetLoaded=!0,this.addJS(this.getCDNUrl()+"assets/js/richsnippet.js?"+t[1]))}i||r?new TrustindexWidget(null,t):t.isTriggerLoad(100)?s?window.tiElementToWaitForActivity.push(t):new TrustindexWidget(null,t):(t.isWaitForVisibility=!0,window.tiElementToWaitForActivity.push(t))}}))})(t)}))}))}static initWidgetsFromDom(t=!1,e,i){let s=this.widgetsForInit||document.querySelectorAll(".ti-widget:not(.ti-certificate):not(.ti-feed-widget)"+(t?"":":not([data-trustindex-widget])"));void 0!==e&&s.length?(void 0===this.widgetsForInit&&(this.widgetsForInit=s),new TrustindexWidget(s[e]),++ethis.initWidgetsFromDom(t,e,i)),20):(delete this.widgetsForInit,i&&i())):(s.forEach((t=>new TrustindexWidget(t))),i&&i())}static getWidgetHtml(t){return e(this,null,(function*(){let e=this.getWidgetUrl(t.key)+"content.html";if("wp-widget"===t.key){let i=t.getAttribute("data-template-id");if(i){let e=document.getElementById(i);if(e)return t.removeAttribute("data-template-id"),e.remove(),e.innerHTML.replace(/decoding="async"/g,"").replace(/ (?:src|srcset|data-src|data-srcset|data-ti-src|data-ti-srcset|consent-original-src-_|consent-original-srcset-_|consent-original-data-src-_|consent-original-data-srcset-_)="(?!http)[^"]*"/g,"").replace(/data-ti-src="[^"]+lazy\.(png|jpg|jpeg|gif|svg)"/g,"").replace(/consent-original-class-_="/g,'class="').replace(/consent-original-src-_="/g,'src="').replace(/consent-original-srcset-_="/g,'srcset="').replace(/consent-original-data-src-_="/g,'data-src="').replace(/consent-original-data-srcset="/g,'data-srcset="').replace(/